$(function() {
	//<----------------取出登录的值------------------>
	if(sessionStorage.getItem("user_phone")) {
		$("#he_tel").text(sessionStorage.user_phone);
	}
	if(getCookie("user_phone")) {
		$("#he_tel").text(getCookie("user_phone"));
	}
	$("#he_tel").click(function(){
		if ($(this).text() == "请登录") {
			window.location = "login.html";
		}else{
			alert("我的信息");
		}
	})
	//<----------------退出登录------------------>
	$("#header_exit").click(function() {
		sessionStorage.user_phone = "";
		deleteCookie("user_phone");
		window.location.reload();
	})
	//<-------------我的订单的点击事件-------------->
	$("#header_order").click(function() {
		if($("#he_tel").text() == "请登录") {
			alert("请您先登录");
		} else {
			window.location = "my_order.html";
		}
	})
	//<-------------我的消息的点击事件-------------->
	$("#header_msg").click(function() {
		if($("#he_tel").text() == "请登录") {
			alert("请您先登录");
		} else {
			window.location = "my_message.html";
		}
	})
	//<-------------我是商家的点击事件-------------->
	$("#header_mer").click(function() {
		if($("#he_tel").text() == "请登录") {
			alert("请您先登录");
		} else {
			// 跳转到我是商家界面
		}
	})
//	 首页的城市
	if(localStorage.getItem("nowCity")==""||localStorage.getItem("nowCity")==null){
		$(".hcity").text("");
	}else{
		console.log(localStorage.getItem("nowCity"));
		$(".hcity").text(localStorage.getItem("nowCity"));
	}
	
}) 